unit UPubFunLib;

interface

uses ComObj, ActiveX, SysUtils, Forms, Windows;

function CreateGUIDStr: string;

function ShowConfirm(Text, Caption: string): Boolean;

implementation

function CreateGUIDStr: string;
var
  lGuid: TGUID;
begin
  CoCreateGUID(lGuid);
  Result := GUIDToString(lGuid);
  Result := StringReplace(Result, '-', '', [rfReplaceAll]);
  Result := Copy(Result, 2, Length(Result) - 2);
end;

function ShowConfirm(Text, Caption: string): Boolean;
begin
  Result := Application.MessageBox(PWideChar(Text), PWideChar(Caption), MB_ICONQUESTION + MB_OKCANCEL) = IDOK;
end;

end.
